package com.fyzk.activity.zoushitu;


import com.fyzk.bean.ChartItem;

import java.util.ArrayList;

public class ZST_infor {
	

	public static int[][] getHongPrize(ArrayList<ChartItem> arrayChartItems){
		int [][] h_prize = new int[arrayChartItems.size()][];
		for (int i = 0; i < arrayChartItems.size(); i++) {
			int [] h_p;
			String prize = arrayChartItems.get(i).winCode;
			String h_prizeNum = "";
			if (prize.contains("|")) {
				h_prizeNum = prize.split("\\|")[0];
			}
			
			String[] hs = h_prizeNum.split(",");
			h_p = new int[hs.length];
			for (int j = 0; j < hs.length; j++) {
				h_p[j] = Integer.parseInt(hs[j]);
			}
			
			h_prize[i] = h_p;
		}
		
		return h_prize;
	}
	
	public static int[][] getLanPrize(ArrayList<ChartItem> arrayChartItems){
		int [][] h_prize = new int[arrayChartItems.size()][];
		for (int i = 0; i < arrayChartItems.size(); i++) {
			int [] l_p;
			String prize = arrayChartItems.get(i).winCode;
			String l_prizeNum = "";
			if (prize.contains("|")) {
				l_prizeNum = prize.split("\\|")[1];
			}
			
			l_p = new int[l_prizeNum.length()];
			l_p[0] = Integer.parseInt(l_prizeNum);
			
			h_prize[i] = l_p;
		}
		
		return h_prize;
	}
}
